package com.pmcc.core.repository;

import com.pmcc.core.entity.security.Dict;
import com.pmcc.core.entity.security.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by Tomas on 2018/4/9.
 */
public interface RoleRepository extends JpaRepository<Role,String> {

    Role findById(String id);

   /* Role findRoleById(String roleId);

    Page<Role> findAll(Pageable var1);*/

    Page<Role> findAll(Specification<Role> spec, Pageable var1);
    List<Role> findByName(String name);

    List<Role> findByCode(String code);
    List<Role> findAll();
}
